package com.bioroadlab.pojo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * DiseaseTestObjectRelId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class DiseaseTestObjectRelId implements java.io.Serializable {

	// Fields

	private static final long serialVersionUID = 1L;

	private Integer disease;
	private Integer testObject;

	@Column(name = "disease", nullable = false)
	public Integer getDisease() {
		return this.disease;
	}

	public void setDisease(Integer disease) {
		this.disease = disease;
	}

	@Column(name = "test_object", nullable = false)
	public Integer getTestObject() {
		return this.testObject;
	}

	public void setTestObject(Integer testObject) {
		this.testObject = testObject;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof DiseaseTestObjectRelId))
			return false;
		DiseaseTestObjectRelId castOther = (DiseaseTestObjectRelId) other;

		return ((this.getDisease() == castOther.getDisease()) || (this
				.getDisease() != null && castOther.getDisease() != null && this
				.getDisease().equals(castOther.getDisease())))
				&& ((this.getTestObject() == castOther.getTestObject()) || (this
						.getTestObject() != null
						&& castOther.getTestObject() != null && this
						.getTestObject().equals(castOther.getTestObject())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getDisease() == null ? 0 : this.getDisease().hashCode());
		result = 37
				* result
				+ (getTestObject() == null ? 0 : this.getTestObject()
						.hashCode());
		return result;
	}

}